package com.zhkj.framework.controller;

import com.zhkj.framework.domain.User;
import com.zhkj.framework.service.UserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * @Auther: zhangy
 * @Date: 2018/10/12 09:39
 * @Description:
 */
@RestController
public class UserController {

    @Autowired
    private UserService userService;

    @GetMapping("test")
    public String sayFramework(){
        return "This is a Framework!";
    }

    @GetMapping("user")
    public List<User> selectaa(){
        return userService.finaUsers();
    }

}
